package com.smart.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.smart.common.PageInfo;
import com.smart.common.enums.ProjectTempTaskStatusEnum;
import com.smart.model.domain.ProjectTempTaskDO;
import com.smart.model.request.ProjectReportDetailRequest;
import com.smart.model.request.ProjectReportStatisticsRequest;
import com.smart.model.request.ProjectTempTaskAddRequest;
import com.smart.model.request.ProjectTempTaskRequest;
import com.smart.model.request.ProjectTempTaskUpdateRequest;
import com.smart.model.vo.ProjectReportDetailVO;
import com.smart.model.vo.ProjectTempTaskVO;
import com.smart.model.vo.ProjectVO;

import java.util.List;

/**
 * @author zhanghong
 */
public interface ProjectTempTaskService extends IService<ProjectTempTaskDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
     ProjectTempTaskVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<ProjectTempTaskVO> supervisePageQuery(ProjectTempTaskRequest request);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<ProjectTempTaskVO> managePageQuery(ProjectTempTaskRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<ProjectTempTaskVO> listQuery(ProjectTempTaskRequest request);
    /**
     * 新增
     * @param request
     * @return
     */
    Boolean add(ProjectTempTaskAddRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(ProjectTempTaskUpdateRequest request);
    /**
     * 根据主键删除
     * @param id
     * @return
     */
    Boolean deleteByKey(long id);

    /**
     * 根据状态已开始的临时提报任务配置
     * @param unStart
     * @return
     */
    List<ProjectTempTaskVO> listAlreadyStartByStatus(ProjectTempTaskStatusEnum unStart);
    /**
     * 任务提报项目
     * @param request
     * @return
     */
    PageInfo<ProjectVO> statisticProjectReport(ProjectReportStatisticsRequest request);

    /**
     * 任务提交项目名单>临时提报详情
     * @param request
     * @return
     */
    ProjectReportDetailVO projectReportDetail(ProjectReportDetailRequest request);

    /**
     * 获取临时提报任务编号
     * @return
     */
    String getTempTaskCode();

    /**
     * 撤销
     * @param id
     * @return
     */
    Boolean revokeByKey(long id);

    /**
     * 作废
     * @param id
     * @return
     */
    Boolean cancelByKey(long id);

    /**
     * 根据主键查询
     * @param id
     * @return
     */
    String fileType(long id);

    /**
     * 生成临时任务
     * @param projectId
     * @return
     */
    boolean createTempTask(Long projectId);
}
